We were already doing this for actual actors, but the case was
skipped in the St.Adjustment case.
However, as it is an animatable we can just use its related actor as
reference, and keep the same logic despite their actual object type
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3991>
// whether the transition should finish where it started
const isReversed = autoReverse && numIterations % 2 === 0;
+ // The object is a Clutter.Animatable.
+ const actor = animatable.get_actor();
+
// Copy Clutter's behavior for implicit animations, see
// should_skip_implicit_transition()
- if (animatable instanceof Clutter.Actor && !animatable.mapped)
+ if (!actor?.mapped)
duration = 0;
const prepare = () => {